<template>
  <div class="myContainer">
    <!-- 头部标题 start -->  
    <el-row class="myBorderBottom">
      <el-col :span="7" class="myTitleText myLineHeight_40px">
        {{title}}
      </el-col>
      <el-col :span="17" class="myTextAlignRight">
        <!-- <el-button type="primary" class="myBgGreen" @click="add">新增</el-button> -->
      </el-col>
    </el-row>
    <!-- 头部标题 end -->
    <el-row :gutter="10" class="myPaddingTop_10px">
      <el-col :span="6">
        <template>
          <el-cascader
            placeholder="全部项目/小区"
            :options="regionOptions"
            change-on-select
            v-model="regionOptSelected">
          </el-cascader>
        </template>
      </el-col> 
      <el-col :span="6">
        <el-date-picker
          v-model="time"
          type="daterange"
          format="yyyy-MM-dd"
          value-format="yyyy-MM-dd"
          range-separator="至"
          start-placeholder="开始日期"
          end-placeholder="结束日期">
        </el-date-picker>
      </el-col>
      <el-col :span="6">
        <el-button type="primary">查询</el-button>
      </el-col>  
    </el-row>
    
    <el-row class="myPaddingTop_10px">
      <el-col :span="24">
        <template>
          <el-table
            border
            :data="list"
            :stripe = true
            v-loading="loading"
            style="width: 100%">
            <el-table-column
              label="变更单号"
              prop="dev_room_name">
            </el-table-column>
            <el-table-column
              label="业务时间"
              prop="dev_room_type">
            </el-table-column>
            <el-table-column
              label="操作人"
              prop="alarm_status">
            </el-table-column>
            <el-table-column
              label="资产条码"
              prop="duty_user_name">
            </el-table-column>
            <el-table-column
              label="资产名称"
              prop="duty_user_phone">
            </el-table-column>
            <el-table-column
              label="规格型号"
              prop="duty_user_phone">
            </el-table-column>
            <el-table-column
              label="SN号"
              prop="duty_user_phone">
            </el-table-column>
            <el-table-column
              label="变更内容"
              prop="duty_user_phone">
            </el-table-column>
          </el-table>
        </template>
      </el-col>
    </el-row>
    
    <div class="block">                    
      <el-pagination
        @size-change="handleSizeChange"
        @current-change="handleCurrentChange"
        :current-page="page_num"
        :page-sizes="[10, 15]"
        :page-size="page_size"
        layout="total, sizes, prev, pager, next, jumper"
        :total="total">
      </el-pagination>
    </div>
    
  </div>
</template>     
  
<style scoped>
  .myBorderBottom{
    border-bottom:1px solid #dbdbdb;
    padding-bottom: 5px;
  }
  .myTextAlignRight{
    text-align: right;
  }
  .myContainer{
    background: #fff;
    padding: 10px;
  }
  .myTitleText{
    font-weight: 500;
    font-size: 16px;
  }
  .myLineHeight_40px{
    line-height: 40px;
  }
  .myPaddingTop_10px{
    padding-top: 10px;
  }  
  .myred{
    color: #f00;
    font-size: 12px;
  }
  .myMarginBottom_10px{
    margin-bottom: 10px;
  }
  .myLeftMsg{
    line-height: 40px;
    text-align: right;
  }
  .RepairDigTab{
    width: 100%;
    border: 1px solid #e6ebf5;
    padding: 0;
    border-spacing: 0;
    border-collapse: collapse;
  }
  .RepairDigTab tr,.RepairDigTab td{
    border: 1px solid #e6ebf5;
  }
  .RepairDigTab td{
    width: 25%;
    height: 40px;
  }
</style>

<script>
  import { extractAreaIds } from '@/utils/misc';
  import { getRegion } from '@/utils/localstorage';
  export default {
    data(){
      return{
        title:"信息变更记录",
        page_num:1,
        page_size:10,
        total:null,
        list:[],
        loading:false,
        regionOptions: [],
        regionOptSelected: [],
        time:[]
      }
    },
    components: {

    },
    created(){
      document.title=this.title;
      this.regionOptions = getRegion();
      this.regionOptSelected.push(this.regionOptions[0].value,this.regionOptions[0].children[0].value,this.regionOptions[0].children[0].children[0].value);
    },
    computed: {
      areaIds() {
        return extractAreaIds(this.regionOptSelected, this.regionOptions);
      }
    },
    watch: {
      
    },
    methods:{
      handleSizeChange(val) {//每页条数控制
        this.page_size = val;
      },
      handleCurrentChange(val) {//每页
        this.page_num = val;
      }
      
      
    }
}
</script>

